//
// Created by jiaxv on 25-8-24.
//

#include "define.h"
#include "interface/ground.h"


l_err gau_2_g1u(net_element_t *net_ele, buffer_t *in_buf, element_propt_t *propt) {

    if (!propt) {
        cn_log_error(net_ele->element_tag, INTERFACE_G1U, "NO valid propt for G1U");
        return LD_ERR_INVALID;
    }

    // cn_log_buf(LOG_WARN, net_ele->element_tag, INTERFACE_G1U, "UP PKT", in_buf->ptr, in_buf->len);

    if (default_cn_forward_handler(net_ele, in_buf, propt, INTERFACE_GAU) != LD_OK) {
        cn_log_error(net_ele->element_tag, INTERFACE_G1U, "Failed to send");
        return LD_ERR_NULL;
    }

    return LD_OK;
}

